import type { FieldConfig } from '@/components/TableFilter.vue'

// 表格列配置
export const tableColumns = [
  {
    title: 'ID',
    dataIndex: 'id',
    fixed: 'left'
  },
  {
    title: '統計月份',
    dataIndex: 'statMonth',
  },
  {
    title: '獎金名稱',
    dataIndex: 'bonusName',
  },
  {
    title: '醫師姓名',
    dataIndex: 'doctorName',
  },
  {
    title: '員工編號',
    dataIndex: 'staffCode',
  },
  {
    title: '店舖',
    dataIndex: 'shop',
  },
  {
    title: '指定產品總銷售額',
    dataIndex: 'totalSalesAmount',
  },
  {
    title: '指定產品店銷售額',
    dataIndex: 'shopSalesAmount',
  },
  {
    title: '指定產品店銷售額佔比',
    dataIndex: 'shopRatio',
  },
  {
    title: '可獲獎金',
    dataIndex: 'bonusAmount',
  },
  {
    title: '統計月份',
    dataIndex: 'statMonth',
  },
  {
    title: '起始日期',
    dataIndex: 'startDate',
  },
  {
    title: '結束日期',
    dataIndex: 'endDate',
  },
  {
    title: '是否歸檔',
    dataIndex: 'isArchived',
  },
  {
    title: '最後修改時間',
    dataIndex: 'updatedAt',
  },
  {
    title: '操作',
    key: 'action',
    align: 'center',
    fixed: 'right',
  },
]
// 過濾項配置
export const filterFields: FieldConfig[] = [
  {
    name: 'bonus_name',
    label: '獎金名稱',
    type: 'input',
    placeholder: '請輸入獎金名稱',
  },
  {
    name: 'staff_code',
    label: '醫師編號',
    type: 'input',
    placeholder: '請輸入醫師編號',
  },
  {
    name: 'doctor_name',
    label: '醫師姓名',
    type: 'input',
    placeholder: '請輸入醫師姓名',
  },
  {
    name: 'stat_month',
    label: '統計月份',
    type: 'date-picker',
    placeholder: '請選擇統計月份',
    picker: 'month',
  },
  {
    name: 'is_archived',
    label: '是否歸檔',
    type: 'select',
    options: [
      { label: '是', value: 1 },
      { label: '否', value: 0 },
    ],
  },
]
